package database;

public class Day {

    public Day() {
        times = new boolean[24];
    }

    ;
        
        public Day(boolean[] day) throws Exception {
        if (day.length == 24) {
            times = day;
        } else {
            throw new Exception("the array is not the correct size to create a day");
        }
    }

    public void setTimeslot(int index, boolean available) {
        times[index] = available;
    }

    public boolean getTimeslot(int index) {
        return times[index];
    }

    public boolean[] getWholeDay() {
        return times;
    }
    public boolean[] times;
};
